# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年10月14日
"""
import pandas as pd

path = './数据/附加阻尼比计算原始数据.xlsx'

# data_xd = pd.read_excel(path, sheet_name='X向位移角', skiprows=3, usecols=[0, 1, 6], names=['时程', '层', '层间位移(mm)'])
data_yd = pd.read_excel(path, sheet_name='Y向位移角', skiprows=1, usecols=[0, 1, 6], names=['时程', '层', '层间位移(mm)'])

# 筛选只包含'X(全部)'的数据行
con = data_yd['时程'].str.contains('Y\(全部\)', regex=True)
data_yd = data_yd[con].reset_index(drop=True)
data_yd['层间位移(mm)'] = abs(data_yd['层间位移(mm)'])
print(data_yd)

data_yd.to_excel('./数据/03结果-Y向位移.xlsx', index=False)